<template>
	<view class="install">
		<view>
			<p @click="skip('/pages/user/list/safety/safety?mobile='+mobile)" style="border-bottom: 1px solid #F0F0F0;">
				账号安全<u-icon name="arrow-right" size="18"></u-icon></p>
			<p @click="skip('/pages/user/list/agreement/agreement')">关于我们<u-icon name="arrow-right" size="18"></u-icon>
			</p>
		</view>
		<button @click="dropOut">退出登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mobile: "",
			};
		},
		methods: {
			skip(url) {
				uni.navigateTo({
					url,
				})
			},
			dropOut() {
				this.$httpRequest('/user/loginOut').then(res => {
					uni.removeStorageSync('userToken');
					uni.switchTab({
						url: '/pages/home/home'
					})
				})
			}
		},
		onLoad(option) {
			this.mobile = option.mobile;
		}
	}
</script>

<style lang="less">
	.install {
		&>view {
			width: 690rpx;
			background: #fff;
			border-radius: 20rpx;
			margin: 20rpx auto;
			padding: 0 20rpx;
			box-sizing: border-box;

			&>p {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 86rpx;
				width: 100%;
			}
		}

		&>button {
			width: 690rpx;
			height: 80rpx;
			line-height: 80rpx;
			color: #fff;
			background: #5FC07B;
			font-size: 15px;
			margin-top: 44rpx;
		}
	}
</style>